package cn.jy.nvr.ftp1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.net.Socket;

public class TestCilent {
  public void createSocketClient(String host,int port){
	  Socket socket=null;
	  PrintStream ps=null;
	  BufferedReader br=null;
	  String request="20110624";
	  try {
		  socket=new Socket(host,port);
		  ps=new PrintStream(socket.getOutputStream());
		  ps.write(request.getBytes());
		  ps.flush();
		  ps.close();
		  br=new BufferedReader(new InputStreamReader(socket.getInputStream()));
		  System.out.println(br.readLine());
	} catch (IOException e) {
		e.printStackTrace();
	}
	  
  }
  public static void main(String[] args) {
	ftpSenderFile ftpSenderFile=new ftpSenderFile("192.168.0.110", 9595);
	try {
		ftpSenderFile.send("D:/DownLoad/atest1.mp4","ShareFtp/jzVideo/2017/10/31/400201[21-40-18][21-44-18].mp4");
	} catch (IOException e) {
		e.printStackTrace();
	}
}
}
